local CLASS = { };

function CLASS:Construct( filename )
	
	local uniname = filename:match( "^pow_([%w_]+)%.lua$" ); -- seriously, i will lose it
	
	if uniname then
		
		local obj = { };
		setmetatable( obj, self );
		self.__index = self;
		
		obj.UniName = uniname;
		obj.Owner = nil;
		obj.Id = 0;
		
		obj._NextThink = 0;
		
		obj.Name = "N/A";
		obj.Desc = "N/A";
		obj.Version = "N/A";
		obj.Author = "N/A";
		
		return obj;
		
	end
	
end

//called when the power gets loaded - either on startup or when you run heroes_reload
function CLASS:Initialize( )
end

//called when a player presses a key - player in these events is replaced with self.Owner
function CLASS:KeyPress( key )
end

//called when a player releases a key
function CLASS:KeyRelease( key )
end

//called when a player changes their power to this
function CLASS:Enabled( )
end

//called when a player changes their power from this
function CLASS:Disabled( )
end

//called when a player thinks
function CLASS:Think( )
end

//called when a player receives damage
function CLASS:ScalePlayerDamage( hitgroup, dmg )
end

//sets the next think time - the same as NextThink for entities
function CLASS:NextThink( num )
	
	self._NextThink = num;
	
end

function heroes.CreatePower( ... )
	
	return CLASS:Construct( ... );
	
end